import request from '@/utils/request'

// 查询租约保理申请列表
export function listFactoring(query) {
  return request({
    url: '/financial/factoring/list',
    method: 'get',
    params: query
  })
}
// 查询租房合同
export function getContract(query) {
  return request({
    url: '/financial/factoring/getContract',
    method: 'get',
    params: query
  })
}

// 查询选中的信息
export function getSelectContract(query) {
  return request({
    url: '/financial/factoring/getSelectContract',
    method: 'get',
    params: query
  })
}

// 查询租约保理申请详细
export function getFactoring(id) {
  return request({
    url: '/financial/factoring/' + id,
    method: 'get'
  })
}

// 新增租约保理申请
export function addFactoring(data) {
  return request({
    url: '/financial/factoring',
    method: 'post',
    data: data
  })
}

// 修改租约保理申请
export function updateFactoring(data) {
  return request({
    url: '/financial/factoring',
    method: 'put',
    data: data
  })
}

// 删除租约保理申请
export function delFactoring(id) {
  return request({
    url: '/financial/factoring/' + id,
    method: 'delete'
  })
}

// 查询金融产品
export function getProduct() {
  return request({
    url: '/financial/factoring/getProduct',
    method: 'get'
  })
}
